package com.study.mybatisplus.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * <p>
 * 微信授权信息表
 * </p>
 *
 * @author flwu
 * @since 2020-03-20
 */
@TableName("tbl_wechat_auth")
public class WechatAuth implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 关联用户id
     */
    private Long userId;

    /**
     * 授权平台  0录白 1微信  2小程序 
     */
    private Boolean authType;

    /**
     * openid
     */
    private String openid;

    /**
     * 昵称
     */
    private String nickname;

    /**
     * 性别 0未知 1男 2女
     */
    private Boolean sex;

    /**
     * 国家
     */
    private String country;

    /**
     * 省份
     */
    private String province;

    /**
     * 城市
     */
    private String city;

    /**
     * 头像
     */
    private String avatar;

    private String unionid;

    /**
     * 是否下线 0否 1是
     */
    private Boolean isOffline;

    private LocalDateTime createDatetime;

    private LocalDateTime updateDatetime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }
    public Boolean getAuthType() {
        return authType;
    }

    public void setAuthType(Boolean authType) {
        this.authType = authType;
    }
    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }
    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }
    public Boolean getSex() {
        return sex;
    }

    public void setSex(Boolean sex) {
        this.sex = sex;
    }
    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }
    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }
    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }
    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }
    public String getUnionid() {
        return unionid;
    }

    public void setUnionid(String unionid) {
        this.unionid = unionid;
    }
    public Boolean getOffline() {
        return isOffline;
    }

    public void setOffline(Boolean isOffline) {
        this.isOffline = isOffline;
    }
    public LocalDateTime getCreateDatetime() {
        return createDatetime;
    }

    public void setCreateDatetime(LocalDateTime createDatetime) {
        this.createDatetime = createDatetime;
    }
    public LocalDateTime getUpdateDatetime() {
        return updateDatetime;
    }

    public void setUpdateDatetime(LocalDateTime updateDatetime) {
        this.updateDatetime = updateDatetime;
    }

    @Override
    public String toString() {
        return "WechatAuth{" +
            "id=" + id +
            ", userId=" + userId +
            ", authType=" + authType +
            ", openid=" + openid +
            ", nickname=" + nickname +
            ", sex=" + sex +
            ", country=" + country +
            ", province=" + province +
            ", city=" + city +
            ", avatar=" + avatar +
            ", unionid=" + unionid +
            ", isOffline=" + isOffline +
            ", createDatetime=" + createDatetime +
            ", updateDatetime=" + updateDatetime +
        "}";
    }
}
